#pragma once

#include <iostream>
#include <string>
#include <vector>
#include <ctemplate/template.h>

#include "./as_model.hpp"

namespace as_view
{
    using namespace as_model;

    const std::string templatehtml_PathName = "../templatehtml/";

    class view{
    public:
        model _model;

    public:
        view()
        {
        }
        ~view()
        {
        }

    public:
        void analysis_text_html(std::string *html)
        {
            /*1.形成路径*/
            std::string result_html = templatehtml_PathName + "analysis.html";
            /*2.形成数字典*/
            ctemplate::TemplateDictionary root("analysis");
            /*3.获取被渲染的html*/
            ctemplate::Template *tpl = ctemplate::Template::GetTemplate(result_html, ctemplate::DO_NOT_STRIP);
            /*4.开始完成渲染功能*/
            tpl->Expand(html, &root);
        }

    private:
    };
}